﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using Domain.Common;
using Domain.Officers;

namespace Domain
{
    /// <summary>
    /// 领域模型对象初始化
    /// </summary>
    public static class DomainInit
    {
        public static void Start(short fid)
        {
            LoadDataFromDB();
            CompositeObject();
            SetPlayForce(fid);
        }

        private static void LoadDataFromDB()
        {
            Treasure.Load();
            Building.Load();
            Force.Load();
            Officer.Load();
            BuildingLevel.Load();
            OfficialPosition.Load();
           
        }

        private static void CompositeObject()
        {
            HistoryDate.InIt();
            Building.Init();
            Officer.Init();
            Force.Init();
        }

        private static void SetPlayForce(short id)
        {
            Force.PlayForce = Force.Forces[id];
            Force.CurrentWorkForce = Force.PlayForce;
        }
    }
}
